<extend name="Public/base"/>
<block name="body">

    <div style="margin: 0px auto;">
        <div class="wrapper wrapper-content animated fadeInRight" >

            <div class="row" >

                <div class="col-sm-6">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>代理编辑 | {$data.username}</h5>

                        </div>
                        <div class="ibox-content">
                            <form class="form-horizontal m-t"  action="{:U('update')}" method="post" onsubmit="return chkform2(this)">

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">代理名称：</label>
                                    <div class="col-sm-8">
                                        <input type="hidden" name="id" value="{$data.id}">
                                        <input id="manu_name" name="username" class="form-control" type="text" required="" value="{$data.username}">
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-3 control-label">用户密码：</label>
                                    <div class="col-sm-8">
                                        <input id="manu_name" name="password" class="form-control" type="text" placeholder="留空则不修改" >
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">手机号：</label>
                                    <div class="col-sm-8">
                                        <input id="linkurl" name="phone" class="form-control" type="text"  value="{$data.phone}">
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-3 control-label">微信号：</label>
                                    <div class="col-sm-8">
                                        <input id="linkurl" name="wechat" class="form-control" type="text"  value="{$data.wechat}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">邮箱号：</label>
                                    <div class="col-sm-8">
                                        <input id="linkurl" name="email" class="form-control" type="text"  value="{$data.email}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">房卡数：</label>
                                    <div class="col-sm-8">
                                        <input id="linkurl" name="jewels" class="form-control" type="text"  value="{$data.jewels}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">金币数：</label>
                                    <div class="col-sm-8">
                                        <input id="linkurl" name="money" class="form-control" type="text"  value="{$data.money}">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">状态：</label>
                                    <div class="col-sm-8"><select class="form-control m-b" name="hide" id="hide">
                                        <option value="0" <if condition="$data['status'] eq 1"> selected </if> ><font color="#32cd32">否</font></option>
                                        <option value="1" <if condition="$data['status'] eq 0"> selected </if> ><font color="red">是</font></option>
                                    </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label">所属分组：</label>
                                    <div class="col-sm-8"><select class="form-control m-b" name="group_id" id="pid">
                                        <volist name="group" id="g">
                                            <option value="{$g.id}" <if condition="$data['group_id'] eq $g['id']" > selected </if>>{$g.group_name}</option>
                                        </volist>
                                    </select>
                                    </div>
                                </div>




                                <div class="form-group">
                                    <div class="col-sm-8 col-sm-offset-3">
                                        <button class="btn btn-primary" type="button" onclick="chkform2(this)">提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        $('#1').attr('class','active');
        $("#pid option[value='{$menu.pid}']").attr("selected", "selected");
        $("#hide option[value='{$menu.hide}']").attr("selected", "selected");
    </script>

</block>